<template>
  <div>
    <h2>App组件</h2>
    <hr />
    <!-- 
      vue2中给组件绑定事件，默认情况下，绑定的都是自定义事件
      想要自定义事件变成原生事件，需要给事件加修饰符.native
     -->
    <A @click.native="clickHandler"></A>
  </div>
</template>
<script>
import A from "./components/A.vue";
export default {
  name: "App",
  data() {
    return {
      msg: "hello",
    };
  },
  methods: {
    clickHandler() {
      console.log("1111");
    },
  },
  components: {
    A,
  },
};
</script>

<style lang="less" scoped></style>
